package textual

import (
	"testing"
	"os"
	"path/filepath"
	"kumachan/interpreter/lang/textual/syntax"
)


// NOTE: output only (result NOT checked)
func TestOutputSampleParsingResult(_ *testing.T) {
	// parseSampleFileDefault("1")
	// parseSampleFileDefault("2")
	// parseSampleFileDefault("3")
	parseSampleFileDefault("4")
	parseSampleFileDefault("5")
}

func parseSampleFile(name string, root string) {
	var exe_path, err = os.Executable()
	if err != nil { panic(err) }
	var project_path = filepath.Dir(filepath.Dir(exe_path))
	var sample_path = filepath.Join(
		project_path,
		"interpreter", "lang", "textual", "test", (name + ".txt"),
	)
	{ var f, err = os.Open(sample_path)
	if err != nil { panic(err) }
	DebugParser(f, sample_path, root) }
}
func parseSampleFileDefault(name string) {
	parseSampleFile(name, syntax.DefaultRootPartName)
}


